import React, {Component} from 'react'
import {Switch, Route, Redirect} from 'react-router-dom'

import BannerHome from './home'
import BannerAddUpdate from './add-update'
import BannerDetail from './detail'


/*
商品路由
 */
export default class Banner extends Component {
    render() {
        return (
            <Switch>
                <Route path='/banner' component={BannerHome} exact/> {/*路径完全匹配*/}
                <Route path='/banner/addupdate' component={BannerAddUpdate}/>
                <Route path='/banner/detail' component={BannerDetail}/>
                <Redirect to='/banner'/>
            </Switch>
        )
    }
}
